package com.chukun.flink.stream.action.fraud.rules.major;

import com.chukun.flink.stream.action.fraud.rules.model.Rule;
import org.apache.flink.api.common.state.MapStateDescriptor;
import org.apache.flink.api.common.typeinfo.BasicTypeInfo;
import org.apache.flink.api.common.typeinfo.TypeInformation;
import org.apache.flink.util.OutputTag;

/**
 * 定义规则的状态数据
 */
public class Descriptors {

    public static final OutputTag<Long> latencySinkTag = new OutputTag<Long>("latency-sink") {};


    public static final OutputTag<Rule> currentRulesSinkTag = new OutputTag<Rule>("current-rules-sink") {};

    public static final MapStateDescriptor<Integer, Rule> rulesDescriptor =
        new MapStateDescriptor<>(
            "rules", BasicTypeInfo.INT_TYPE_INFO, TypeInformation.of(Rule.class));
  }